package net.lahuobao.mall.entity.admin;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.*;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

/**   
 * @Title: Entity
 * @Description: 订单
 * @author zhangdaihao
 * @date 2016-09-20 10:36:45
 * @version V1.0   
 *
 */
@Entity
@Table(name = "mall_order", schema = "lahuobao")
@DynamicUpdate(true)
@DynamicInsert(true)
@SuppressWarnings("serial")
public class MallOrderEntity implements java.io.Serializable {
	/**id*/
	private java.lang.Integer id;
	/**orderno*/
	private java.lang.String orderno;
	/**userid*/
	private java.lang.Integer userid;
	/**createtime*/
	private Timestamp createtime;
	/**paytime*/
	private Timestamp paytime;
	/**shopid*/
	private java.lang.Integer shopid;
	/**productmoney*/
	private BigDecimal productmoney;
	/**paymoney*/
	private BigDecimal paymoney;
	/**isuserdelete*/
	private java.lang.Integer isuserdelete;
	/**cancelreason*/
	private java.lang.String cancelreason;
	/**canceltime*/
	private Timestamp canceltime;
	/**remark*/
	private java.lang.String remark;
	/**ordertype*/
	private java.lang.Integer ordertype;
	/**isinvoiced*/
	private java.lang.Integer isinvoiced;
	/**usestatus*/
	private java.lang.Integer usestatus;
	/**datasource*/
	private java.lang.Integer datasource;

	private BigDecimal actualPayMoney;

	private MallShopEntity shop;

	private MallUserEntity user;

	private java.lang.String shopname;

	private java.lang.String fullname;

	private java.lang.String username;

	private String createStartTime;

	private String createEndTime;

	/**
	 *方法: 取得java.lang.Integer
	 *@return: java.lang.Integer  id
	 */
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name ="ID",nullable=false,precision=10,scale=0)
	public java.lang.Integer getId(){
		return this.id;
	}

	/**
	 *方法: 设置java.lang.Integer
	 *@param: java.lang.Integer  id
	 */
	public void setId(java.lang.Integer id){
		this.id = id;
	}
	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  orderno
	 */
	@Column(name ="ORDERNO",nullable=false,length=50)
	public java.lang.String getOrderno(){
		return this.orderno;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  orderno
	 */
	public void setOrderno(java.lang.String orderno){
		this.orderno = orderno;
	}
	/**
	 *方法: 取得java.lang.Integer
	 *@return: java.lang.Integer  userid
	 */
	@Column(name ="USERID",nullable=false,precision=10,scale=0)
	public java.lang.Integer getUserid(){
		return this.userid;
	}

	/**
	 *方法: 设置java.lang.Integer
	 *@param: java.lang.Integer  userid
	 */
	public void setUserid(java.lang.Integer userid){
		this.userid = userid;
	}
	/**
	 *方法: 取得Timestamp
	 *@return: Timestamp  createtime
	 */
	@Column(name ="CREATETIME",nullable=false)
	public Timestamp getCreatetime(){
		return this.createtime;
	}

	/**
	 *方法: 设置Timestamp
	 *@param: Timestamp  createtime
	 */
	public void setCreatetime(Timestamp createtime){
		this.createtime = createtime;
	}
	/**
	 *方法: 取得Timestamp
	 *@return: Timestamp  paytime
	 */
	@Column(name ="PAYTIME",nullable=true)
	public Timestamp getPaytime(){
		return this.paytime;
	}

	/**
	 *方法: 设置Timestamp
	 *@param: Timestamp  paytime
	 */
	public void setPaytime(Timestamp paytime){
		this.paytime = paytime;
	}
	/**
	 *方法: 取得java.lang.Integer
	 *@return: java.lang.Integer  shopid
	 */
	@Column(name ="SHOPID",nullable=false,precision=10,scale=0)
	public java.lang.Integer getShopid(){
		return this.shopid;
	}

	/**
	 *方法: 设置java.lang.Integer
	 *@param: java.lang.Integer  shopid
	 */
	public void setShopid(java.lang.Integer shopid){
		this.shopid = shopid;
	}
	/**
	 *方法: 取得BigDecimal
	 *@return: BigDecimal  productmoney
	 */
	@Column(name ="PRODUCTMONEY",nullable=false,precision=18,scale=2)
	public BigDecimal getProductmoney(){
		return this.productmoney;
	}

	/**
	 *方法: 设置BigDecimal
	 *@param: BigDecimal  productmoney
	 */
	public void setProductmoney(BigDecimal productmoney){
		this.productmoney = productmoney;
	}
	/**
	 *方法: 取得BigDecimal
	 *@return: BigDecimal  paymoney
	 */
	@Column(name ="PAYMONEY",nullable=false,precision=18,scale=2)
	public BigDecimal getPaymoney(){
		return this.paymoney;
	}

	/**
	 *方法: 设置BigDecimal
	 *@param: BigDecimal  paymoney
	 */
	public void setPaymoney(BigDecimal paymoney){
		this.paymoney = paymoney;
	}
	/**
	 *方法: 取得java.lang.Integer
	 *@return: java.lang.Integer  isuserdelete
	 */
	@Column(name ="ISUSERDELETE",nullable=false,precision=3,scale=0)
	public java.lang.Integer getIsuserdelete(){
		return this.isuserdelete;
	}

	/**
	 *方法: 设置java.lang.Integer
	 *@param: java.lang.Integer  isuserdelete
	 */
	public void setIsuserdelete(java.lang.Integer isuserdelete){
		this.isuserdelete = isuserdelete;
	}
	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  cancelreason
	 */
	@Column(name ="CANCELREASON",nullable=true,length=100)
	public java.lang.String getCancelreason(){
		return this.cancelreason;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  cancelreason
	 */
	public void setCancelreason(java.lang.String cancelreason){
		this.cancelreason = cancelreason;
	}
	/**
	 *方法: 取得Timestamp
	 *@return: Timestamp  canceltime
	 */
	@Column(name ="CANCELTIME",nullable=true)
	public Timestamp getCanceltime(){
		return this.canceltime;
	}

	/**
	 *方法: 设置Timestamp
	 *@param: Timestamp  canceltime
	 */
	public void setCanceltime(Timestamp canceltime){
		this.canceltime = canceltime;
	}
	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  remark
	 */
	@Column(name ="REMARK",nullable=true,length=200)
	public java.lang.String getRemark(){
		return this.remark;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  remark
	 */
	public void setRemark(java.lang.String remark){
		this.remark = remark;
	}
	/**
	 *方法: 取得java.lang.Integer
	 *@return: java.lang.Integer  ordertype
	 */
	@Column(name ="ORDERTYPE",nullable=false,precision=10,scale=0)
	public java.lang.Integer getOrdertype(){
		return this.ordertype;
	}

	/**
	 *方法: 设置java.lang.Integer
	 *@param: java.lang.Integer  ordertype
	 */
	public void setOrdertype(java.lang.Integer ordertype){
		this.ordertype = ordertype;
	}
	/**
	 *方法: 取得java.lang.Object
	 *@return: java.lang.Object  isinvoiced
	 */
	@Column(name ="ISINVOICED",nullable=false,precision=1)
	public java.lang.Integer getIsinvoiced(){
		return this.isinvoiced;
	}

	/**
	 *方法: 设置java.lang.Object
	 *@param: java.lang.Object  isinvoiced
	 */
	public void setIsinvoiced(java.lang.Integer isinvoiced){
		this.isinvoiced = isinvoiced;
	}
	/**
	 *方法: 取得java.lang.Integer
	 *@return: java.lang.Integer  usestatus
	 */
	@Column(name ="USESTATUS",nullable=false,precision=10,scale=0)
	public java.lang.Integer getUsestatus(){
		return this.usestatus;
	}

	/**
	 *方法: 设置java.lang.Integer
	 *@param: java.lang.Integer  usestatus
	 */
	public void setUsestatus(java.lang.Integer usestatus){
		this.usestatus = usestatus;
	}
	/**
	 *方法: 取得java.lang.Integer
	 *@return: java.lang.Integer  datasource
	 */
	@Column(name ="DATASOURCE",nullable=false,precision=10,scale=0)
	public java.lang.Integer getDatasource(){
		return this.datasource;
	}

	/**
	 *方法: 设置java.lang.Integer
	 *@param: java.lang.Integer  datasource
	 */
	public void setDatasource(java.lang.Integer datasource){
		this.datasource = datasource;
	}

	@Column(name ="actualpaymoney",nullable=false,precision=18,scale=2)
	public BigDecimal getActualPayMoney() {
		return actualPayMoney;
	}

	public void setActualPayMoney(BigDecimal actualPayMoney) {
		this.actualPayMoney = actualPayMoney;
	}

	@OneToOne
	@JoinColumn(name = "shopid", insertable = false, updatable = false)
	public MallShopEntity getShop() {
		return shop;
	}

	public void setShop(MallShopEntity shop) {
		this.shop = shop;
	}

	@OneToOne
	@JoinColumn(name = "userid", insertable = false, updatable = false)
	public MallUserEntity getUser() {
		return user;
	}

	public void setUser(MallUserEntity user) {
		this.user = user;
	}

	@Transient
	public String getShopname() {
		return shopname;
	}

	public void setShopname(String shopname) {
		this.shopname = shopname;
	}

	@Transient
	public String getFullname() {
		return fullname;
	}

	public void setFullname(String fullname) {
		this.fullname = fullname;
	}

	@Transient
	public String getCreateStartTime() {
		return createStartTime;
	}

	public void setCreateStartTime(String createStartTime) {
		this.createStartTime = createStartTime;
	}

	@Transient
	public String getCreateEndTime() {
		return createEndTime;
	}

	public void setCreateEndTime(String createEndTime) {
		this.createEndTime = createEndTime;
	}

	@Transient
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}
}
